package nxu.it.movieapi.service.pg.entity;


import org.seasar.doma.Entity;
import org.seasar.doma.Table;
import org.seasar.doma.Transient;
import org.seasar.doma.jdbc.entity.NamingType;

import java.time.LocalDate;
import java.util.List;

@Entity(naming = NamingType.SNAKE_LOWER_CASE)
@Table(name="movie")
public class MovieEntity {
    private Long id;
    private String originalTitle;
    private String chineseTitle;
    private String aka;
    private Integer year;
    private String region;
    private Integer duration;
    private String language;
    private LocalDate pubDate;
    private String summary;
    private String posterUrl;
    private Double rating;
    private String poster;
    private String avatar;
    private LocalDate birthday;


    @Transient
    private List<CastEntity> actor;
    private String actors;

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public LocalDate getBirthday() {
        return birthday;
    }

    public void setBirthday(LocalDate birthday) {
        this.birthday = birthday;
    }



    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getOriginalTitle() {
        return originalTitle;
    }

    public void setOriginalTitle(String originalTitle) {
        this.originalTitle = originalTitle;
    }

    public String getChineseTitle() {
        return chineseTitle;
    }

    public void setChineseTitle(String chineseTitle) {
        this.chineseTitle = chineseTitle;
    }

    public String getAka() {
        return aka;
    }

    public void setAka(String aka) {
        this.aka = aka;
    }

    public Integer getYear() {
        return year;
    }

    public void setYear(Integer year) {
        this.year = year;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    public LocalDate getPubDate() {
        return pubDate;
    }

    public void setPubDate(LocalDate pubDate) {
        this.pubDate = pubDate;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public String getPosterUrl() {
        return posterUrl;
    }

    public void setPosterUrl(String posterUrl) {
        this.posterUrl = posterUrl;
    }

    public Double getRating() {
        return rating;
    }

    public void setRating(Double rating) {
        this.rating = rating;
    }

    public String getPoster() {
        return poster;
    }

    public void setPoster(String poster) {
        this.poster = poster;
    }




    @Override
    public String toString() {
        return "MovieEntity{" +
                "id=" + id +
                ", originalTitle='" + originalTitle + '\'' +
                ", chineseTitle='" + chineseTitle + '\'' +
                ", aka='" + aka + '\'' +
                ", year=" + year +
                ", region='" + region + '\'' +
                ", duration=" + duration +
                ", language='" + language + '\'' +
                ", pubDate=" + pubDate +
                '}';
    }
}
